
<div class="container-fluid">
    <div class="wrapper">
        <div class="panel" id="nav">
            <div class="panel-heading"><h3 class="panel-title">FBA头程分摊计算报表</h3></div>
            <div class="panel-body">
                <form action="__URL__/uploadFile" enctype="multipart/form-data" method="post" id="form"  onsubmit="return checkUpload()">
                    <div class="form-group col-md-3">
                        <label class="col-md-4 control-label required">上传文件</label>
                        <div class="col-md-8"><input name="file" class="form-control" data-val="true"
                                                     data-val-required="请选择[上传文件]!" id="status_file" type="file" value="">
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-sm-12 col-md-8  add-space">
                        <input class="btn btn-primary" type="button" value="下载模板" id="status_download">
                        <input class="btn btn-success" type="submit" value="上传文件下载" id="download">
                    </div>
                </form>
            </div>

        </div>
    </div>
</div>
</div>
<script type="text/javascript" src="__PUBLIC__/javascripts/admin/layer/layer.js"></script>
<script>
    $('.form-date_1').datetimepicker({
        lang:'ch',
        timepicker:false,
        format:'Y-m-d',
        formatDate:'Y-m-d',
        onChangeDateTime:function(dp,$input){
            //alert(dp);
            date_needs();
        },
        onSelectDate:function()
        {
            date_needs();
        }
    });
    $("#status_download").click(function () {
        var fileName="FBA头程分摊计算报表上传模板";
        var list=new Array(["SHIPMENT ID"],["追踪号/提单号/柜号"],["总运费"],["运输方式(空运/快递/海运/铁运/TNT)"]);
        var list1= new Array(["FBAMH65Z6"],["415285205"],['100'],["空运"]);
        window.location.href ="{:U('Transportplan/fbaHead')}?"+"fileName="+fileName+"&list="+list+"&list1="+list1;
    });
    function checkUpload() {
        var data = $("input[name='file']").val();
        if(data==''){
            layer.msg('请选择文件', {icon: 5});return false;
        }else{
            return true;
        }
    }
</script>